distance and rate problems